<template>
	<view class="container">
		<view class="header"><image src="../../static/icon6.png" mode=""></image></view>
		<view class="content">
			<view class="first">
				<text>{{fromName}}</text>
				<image src="../../static/right.png" mode=""></image>
				<text>{{toName}}</text>
			</view>
			<view class="second"></view>
			<view class="third">
				<!-- <text>
					对于在湖北入境的人员，实施“14+14”的健康管理措施。即14天集中隔离医学观察，期间进行2次核酸检测和1次抗体检测;集中隔离医学观察期满后再实施14天居家医学观察，期间进行两次核酸检测。入境人员隔离点应在隔离对象隔离期满前3天，将隔离人员相关信息通知其地新冠肺炎疫情防控指挥部，以便当地落实居家医学观察。
				</text>
				<text>
					天居家医学观察，期间进行两次核酸检测。入境人员隔离点应在隔离对象隔离期满前3天，将隔离人员相关信息通知其地新冠肺炎疫情防控指挥部，以便当地落实居家医学观察。
				</text> -->
				<view class="st">{{ this.policy_list }}</view>
			</view>
			<view class="fouth">
				<image src="../../static/erwei.jpg" mode=""></image>
				<view class="neirong">
					<text>数据来源(可点击,数据来源列表)</text>
					<text>{{ this.policy_city }}城市疫情防控指挥中心</text>
				</view>
			</view>
		</view>
		<view class="footer"><image src="../../static/image1.png" mode=""></image></view>
	</view>
</template>

<script>
import data_index from "./home.vue";
export default {
	data() {
		return {
			policy: '',
			policy_city: '',
			policy_time: '',
			policy_list: '',
			fromName: "",
			toName: "",
			// index4_name1: '',
		};
	},

	onLoad: function(obj) {
		let policy = obj.policy
		this.fromName = obj.share_name
		this.toName = obj.share_names
		this.getDetailes(policy);
		console.log(policy,  "拿得到目的省市的code不")
		// console.log(fromName,  "拿得到出发省地址不")
		// console.log(toName,  "拿得到目的省地址不")
	},
	methods: {
		getDetailes(policy) {
			uni.request({
				url: 'http://epidemic.site.ximengnaikang.com/api/v1/city/policy',
				method: 'POST',
				data: {
					city_code: policy
				},
				header: {
					'Content-Type': 'application/json'
				},
				success: res => {
					this.policy_all = res.data.data;
					// console.log(this.policy_all, 'index2加载过来的内容');
					this.policy_city = this.policy_all.city;
					this.policy_time = this.policy_all.leave_policy_date;
					this.policy_list = this.policy_all.back_policy;
				}
			});
		},
		
		// 变成图片
		// getShare() {
		// 	uni.request({
		// 		url: 'http://epidemic.site.ximengnaikang.com/api/v1/policy/xywp38N26PjkQrO3mv0Dd4YALmzXe1ZR',
		// 		method: 'GET',
		// 		success: res => {
		// 			this.shareData = res.data.data;
		// 			console.log(this.shareData);
		// 			wx.config({
		// 				debug: true,
		// 				appId: 'wx22dc4d8cbc0a192d', // 必填，公众号的唯一标识
		// 				timestamp: 1623719022, // 必填，生成签名的时间戳
		// 				nonceStr: 'inpXcMz7en', // 必填，生成签名的随机串
		// 				signature: 'ff3694ab0fb23ab6d46fb97e9f85e0053e57e4d3', // 必填，签名
		// 				jsApiList: ['updateAppMessageShareData', 'updateTimelineShareData'] // 必填，需要使用的JS接口列表
		// 			});
		// 		}
		// 	});
		// 	// 用不了test3倒过来的东西
		// 	// console.log(sharePage.data, "jfsdjf;jsd;lfjs;jfs;ljg;asdj;lj;sadjg;sadjg;aslgj");
		// 	console.log(fromName,  "拿得到出发省地址不kkjhkl;jklj")
		// }
	}
};
</script>

<style>
.container {
	background-image: url(../../static/bg.png);
	height: 748px;
	width: 375px;
	display: flex;
	justify-content: center;
	position: relative;
}
.content {
	margin-top: 52px;
	width: 345px;
	height: 532px;
	background: #ffffff;
	opacity: 1;
	border-radius: 12px;
}
.header image {
	width: 82px;
	height: 80px;
	position: absolute;
	right: 15px;
	top: 23px;
	z-index: 100px;
}
.first {
	margin-top: 45px;
	height: 26px;
	font-size: 26px;
	font-weight: bold;
	color: #23459d;
	font-family: Source Han Sans CN;
	display: flex;
	justify-content: center;
	align-items: center;
}
.first text {
	margin: 0 15px;
}
.first image {
	width: 70px;
	height: 24px;
}
.st {
	font-size: 14px;
	font-family: Source Han Sans CN;
	line-height: 24px;
	color: #333333;
	text-align: center;
	margin: 20px auto;
	height: 310px;
	width: 312px;
	overflow: hidden; /*隐藏溢出的文本  */
	text-overflow: ellipsis;
	word-break: break-all; /*自动换行*/
	-webkit-line-clamp: 13; /*显示的行数*/
	-moz-box-orient: vertical; /*从上到下自动排列子元素*/
	-webkit-box-orient: vertical;
	display: -webkit-box;
}
/* .second {
	font-size: 20px;
	font-family: Source Han Sans CN;
	font-weight: bold;
	line-height: 34px;
	color: #333333;
	text-align: center;
	margin-top: 20px;
}
.third {
	height: 245px;
	font-size: 14px;
	font-family: Source Han Sans CN;
	font-weight: 400;
	line-height: 21px;
	color: #333333;
	padding: 20px 16px;
} */
.third text {
	display: block;
	text-indent: 2rem;
}
.third text:nth-of-type(2) {
	margin-top: 20px;
}
.fouth {
	height: 60px;
	/* border: 1px solid black; */
	margin-top: 30px;
	position: relative;
}
.fouth image {
	width: 60px;
	height: 60px;
	margin-left: 56px;
}
.fouth .neirong {
	/* height: ; */
	display: flex;
	flex-direction: column;
	/* justify-content: flex-end; */
	/* justify-content: space-around; */
	position: absolute;
	right: 0;
	bottom: 0;
	font-size: 14px;
	font-family: Source Han Sans CN;
	font-weight: 400;
	line-height: 21px;
	color: #333333;
	margin-right: 10px;
}
.fouth text:nth-of-type(1) {
	margin-bottom: 10px;
	/* margin-right: 10px; */
}
.fouth text:nth-of-type(2) {
	/* margin-right: 10px; */
	text-align: end;
}
/* 	.footer{
		background: linear-gradient(180deg, #1E37EB 0%, #0FC6A1 100%);
	} */
.footer image {
	/* width: 278px; */
	width: 370px;
	height: 198px;
	position: absolute;
	bottom: 0;
	left: 0;
}
</style>
